import request from '@/utils/request'

/* export function getEmployees() {
  return request({
    url: '/sys/user/simple',
    method: 'get'
  })
} */
export const getEmployees = () => request.get('/sys/user/simple')
export const getEmployeesList = (page, size) => request.get('/sys/user', { params: { page, size }})
export const delEmployees = (id) => request.delete(`/sys/user${id}`)
export function addEmployee(data) {
  return request({
    method: 'post',
    url: '/sys/user',
    data
  })
}
export function importEmployee(data) {
  return request({
    url: '/sys/user/batch',
    method: 'post',
    data
  })
}
export function saveUserDetailById(data) {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'put', // 全量修改
    data
  })
}
export function assignRoles(data) {
  return request({
    url: '/sys/user/assignRoles',
    data,
    method: 'put'
  })
}
